﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PhotoGallery.Model;
using PhotoGallery.BLL;
public partial class _Default : System.Web.UI.Page
{
    protected string pic_init="";
    protected void Page_Load(object sender, EventArgs e)
    {
        PhotoAction pa = new PhotoAction();
        List<Picture> piclist=pa.showAllPhotos();
        foreach (Picture p in piclist) 
        {
            pic_init+="<div class='box showpic'><div class='picbox'><a href='photo.aspx?pid="+p.Id +"' target='_blank'><img height='150' width='150' alt="+p.Desp+" class='txpic' src=" + p.Pic + " style='display: block;'></a></div><p>" + p.Desp + "</p><div class='actions'><div class='lefter'><a class='button white' href='#'>评论</a></div><div class='righter'><a class='button white' href='#'>收藏</a><a class='button white' href='#'>分享</a></div></div></div>";
        }
    }
}